home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.2 / Video Toaster v4.2.iso / arexx / cg / batchfonts.rexx < prev    next >
OS/2 REXX Batch file  |  1995-12-22  |  967b  |  35 lines

  1. /* BatchFonts.rexx -- Load a flipping great wudge of fonts */
  2. /* By Bob Caron © 1994 NewTek, Inc.                        */
  3.  
  4. call addlib(CG_AREXX,0)
  5.  
  6. location=REQ_file("Choose a postscript font","","toaster:PSFonts")
  7.  
  8. if right(location,1)="/" && right(location,1)=":" then do
  9.    call REQ_TELL("You have to choose a font.")
  10.    call REMLIB(CG_AREXX)
  11.    exit
  12.    end
  13.  
  14. if exists(location)=0 then do
  15.    call REQ_TELL("Error... I Can't Load THAT!")
  16.    call REMLIB(CG_AREXX)
  17.    exit
  18.    end
  19.  
  20. sizes=REQ_STRING("Enter sizes separated by a comma.","")
  21. sizes=translate(sizes,' ',',abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()-_=+\|][{};::/"><,.~`?')
  22. numofonts=words(sizes)
  23. count=1
  24.  
  25. do until count>numofonts
  26.    size=compress(word(sizes,count))
  27.    count=count+1
  28.    call REQ_BAR("Loading Font:"||count-1)
  29.    if loadfont(location,size)=0 then
  30.       call req_tell("Error Loading:",location,"[In size:"||size||"]")
  31. end
  32.  
  33. call REQ_BAR("ToasterCG")
  34. call REMLIB(CG_AREXX)
  35.